#! /bin/sh /usr/share/dpatch/dpatch-run
## const-char.dpatch by Ilya Barygin <barygin@gmail.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Declare a pointer in src/view/telnetview.cpp, fixing FTBFS with
## DP: eglibc 2.10

@DPATCH@
diff -urNad pcmanx-gtk2-0.3.7~/src/view/telnetview.cpp pcmanx-gtk2-0.3.7/src/view/telnetview.cpp
--- pcmanx-gtk2-0.3.7~/src/view/telnetview.cpp	2008-01-02 06:03:53.000000000 +0300
+++ pcmanx-gtk2-0.3.7/src/view/telnetview.cpp	2009-10-11 19:08:56.000000000 +0400
@@ -632,7 +632,7 @@
 #ifdef USE_WGET
 	if (m_bWgetFiles == true) {
 		const char* t_pcURL = sURL.c_str();
-		char* t_pcDot = strrchr(t_pcURL, '.') + 1;
+		const char* t_pcDot = strrchr(t_pcURL, '.') + 1;
 		char t_cFileType = strlen(t_pcURL) - (t_pcDot -t_pcURL);
 		if (t_cFileType == 3) {
 			if (strncmp(t_pcDot, "rar", 3) == 0 ||
